<?Lassoscript
// Last modified 11/30/09 by Eric Landmann

// FUNCTIONALITY
// This file is included in the Bugs page to process action_params

// CHANGE NOTES
// 4/17/09
// Version 1.0
// 11/30/09
// Worked on admin area

// Copying Action_Params to vars
// Remove leading and trailing spaces
// If required is missing, output an error
// If multiple errors, they will step on each other, but not worried about it

If: (Action_Param:'Error') != '';
	Var:'vError' = (Action_Param:'Error');
/If;
If: (Action_Param:'Option') != '';
	Var:'vOption' = (Action_Param:'Option');
/If;

// Pass a param "New" through the URL to indicate it is a new page
Var:'vNew' = (Action_Param:'New');

Var:'vProcess' = (Action_Param:'Process');

Var:'vID'=(Action_Param:'ID');
Var:'vTID'=(Action_Param:'TID');
Var:'vAllow'=(Action_Param:'Allow');
Var:'vPoster'=(Action_Param:'Poster');
// Can't do this, throws "9941 Illegal attempt to modify a frozen value or type" error
//	$vPoster->trim;
Var:'vSmiley'=(Action_Param:'Smiley');
Var:'vMessage'=(Action_Param:'Message');
// Can't do this, throws "9941 Illegal attempt to modify a frozen value or type" error
//	$vMessage->trim;
Var:'vAttachment'=(Action_Param:'Attachment');
Var:'vPostDate'=(Action_Param:'PostDate');

// If required is missing, output error 1001 "Required Missing"
// but ONLY if the page has been submit
If: $vNew != 'Y';
	If: ($vPoster == '') || ($vAllow == '') || ($vMessage == '');
		Var:'vError' = '1001';
	/If;
/If;
?>